<template>
  <div class="main">
    <!-- <h1>存证</h1> -->
    <el-row :gutter="20" class="hidemenu">
        <el-col :span="3" class="hidetext">
            隐藏菜单
        </el-col>
    </el-row>
    <!-- 出证 -->
    <el-row :gutter="20">
        <el-col :span="4" class="chutext">
            出证服务
        </el-col>
        
    </el-row>
    <!-- 时间 -->
    <el-row :gutter="20" id="time01">
        <el-col :span="7">
            <div class="grid-content bg-purple">
                <div class="block">
                    <el-date-picker
                    v-model="value1"
                    type="date"
                    placeholder="选择日期">
                    </el-date-picker>
                    <span class="demonstration">普通存证</span>
                </div>
            </div>
        </el-col>
        <el-col :span="17">
            <div class="grid-content bg-purple">
                <el-button type="primary" icon="el-icon-search" size="medium">搜索</el-button>
                <el-button size="medium">中等按钮</el-button>
            </div>
        </el-col>
    </el-row>

  <!-- 主体 -->
  <el-row :gutter="20">
        <div class="body1">
            <el-col :gutter="20">
            <el-table
                class="tablemain01"
                fixed="left"
                :data="tableData"
                border
                style="width: 100%">
                <el-table-column
                fixed
                prop="time"
                label="存证时间"
                width="250">
                </el-table-column>
                <el-table-column
                prop="userid"
                label="存证人姓名"
                width="120">
                </el-table-column>
                <el-table-column
                prop="existname"
                label="文件名称"
                width="150">
                </el-table-column>
                <el-table-column
                prop="existname"
                label="存证类型"
                width="130">
                </el-table-column>
                <el-table-column
                prop="assetid"
                label="区块链地址"
                width="270">
                </el-table-column>
                <el-table-column
                prop="exithash"
                label="存证 hash"
                width="350"
                >
                </el-table-column>
                <el-table-column
                label="操作"
                width="170">
                <template slot-scope="scope">
                    <el-button @click="handleClick(scope.row)" type="text" size="small">下载证书</el-button>
                    <!-- <el-button @click="handleClick(scope.row)" type="text" size="small">存证内容查询</el-button> -->
                </template>
                </el-table-column>
            </el-table>
            <div class="paging">
                <el-pagination
                    small
                    layout="prev, pager, next"
                    :total="50">
                </el-pagination>
            </div>
            </el-col>  

          
           
        </div>    
    </el-row>
  </div>
</template>

<script>
import axios from 'axios';
export default {
    name:'exsitsurvey',
    data(){
        return{
            tableData: [],
        }
    },
    methods: {
            // 做一个存证的查询

    },
    mounted() {
        axios({
                method:"get",
                url:"http://hatelys.vipgz1.91tunnel.com/evidence/outevidenceall",
                // 临时传参
                params: {
                  userid:window.localStorage.getItem('userid')
                },
                headers:{
                    'Content-Type':'application/json;charset=UTF-8',
                    'Authorization':'Bearer '+localStorage.getItem('token')
                }
            }).then(resp=>{ 
                // 成功
                if(resp.data.code == 200){
                  // 数据分析 就是把这些数据渲染到页面上
                  console.log(resp);
                  this.tableData = resp.data.data
                }
                else{
                    console.log(resp);
                }
            })
    },
}
</script>

<style>
/* hash盒子溢出隐藏 */
.cell{
  overflow: hidden; /* 给元素设置溢出隐藏属性 */
  text-overflow: ellipsis; /* 文本溢出显示省略号 */
  display: -webkit-box; /* 将对象作为弹性伸缩盒子模型显示 */
  -webkit-box-orient: vertical; /* 设置伸缩盒子的子元素垂直排列 */
  -webkit-line-clamp: 2; /* 显示的行数 */
}

.block{
    padding-left: 20px;
}
.body1 {
		    /* width: 1125px; */
		    height: 1000px;
		    opacity: 1;
		    background: rgba(255, 255, 255, 1);
            margin: 20px 20px 10px 0px;
		}

.hidemenu{
    width: 100%;
    height: 50px;
}

.hidetext{
    font-size: 14px;
    font-weight: 400;
    color: rgba(116, 121, 140, 1);
    vertical-align: top;
}

.chutext{
    font-size: 18px;
    font-weight: 300;
    color: rgba(40, 45, 48, 1);
    vertical-align: top;
}

#time01{
    width: 100%;
    height: 80px;
    line-height: 80px;
    margin: 20px 10px 10px 0px;
    background-color:white ;
}
</style>